<%--
  Created by IntelliJ IDEA.
  User: yuan
  Date: 2022/11/21
  Time: 18:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>主页</title>
</head>
<body>
<div align="center">
    <h1>主页</h1>
    ${requestScope.msg}
    <c:if test="${sessionScope.loginUser != null}">
        欢迎【${sessionScope.loginUser}】登录
        <br>
    </c:if>
    <c:choose>
        <c:when test="${sessionScope.loginUser != null}">
            欢迎【${sessionScope.loginUser}】登录
            <br>
        </c:when>
        <c:otherwise>
            请先登录，5秒后将自动跳转,点击<a href="login.jsp">此处</a>立即跳转
            <meta http-equiv="refresh" content="5;url='login.jsp'">
        </c:otherwise>
    </c:choose>

    <br>
    <a href="count.jsp">查看当前网站在线人数</a> <br>
    <a href="javascript:void(0)" onclick="window.history.back()">返回</a> <br>
    <a href="loginServlet?action=logout">退出</a> <br>
</div>
</body>
</html>
